<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Dhara: src/numerical.cc File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Dhara
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">numerical.cc File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;Eigen/Dense&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &quot;<a class="el" href="main_8h_source.html">../include/main.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="vertclass_8h_source.html">../include/vertclass.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="parser_8h_source.html">../include/parser.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a371bc32b72323690def17ba8205f4fd3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="numerical_8cc.html#a371bc32b72323690def17ba8205f4fd3">AllocateMemoryFlowModel</a> (<a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *timeforcings, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&amp;overland_host, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&amp;overland_dev, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;subsurface_host, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;subsurface_dev, int procsize, int3 globsize, int num_steps)</td></tr>
<tr class="memdesc:a371bc32b72323690def17ba8205f4fd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate run-time memory for Flow3D model in host and device memory.  <a href="#a371bc32b72323690def17ba8205f4fd3">More...</a><br /></td></tr>
<tr class="separator:a371bc32b72323690def17ba8205f4fd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9da8704200ecb683a74555de7c432d29"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="numerical_8cc.html#a9da8704200ecb683a74555de7c432d29">AllocateMemoryForcing</a> (<a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *timeforcings, int rank, int procsize, int num_steps)</td></tr>
<tr class="memdesc:a9da8704200ecb683a74555de7c432d29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate memory for forcing variables.  <a href="#a9da8704200ecb683a74555de7c432d29">More...</a><br /></td></tr>
<tr class="separator:a9da8704200ecb683a74555de7c432d29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d9227bd71f2dfba528d9fcc0a2e6fdd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="numerical_8cc.html#a1d9227bd71f2dfba528d9fcc0a2e6fdd">FreeHostMemory</a> (<a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *timeforcings, <a class="el" href="class_forcing_class.html">ForcingClass</a> *forcings, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface, <a class="el" href="class_switch_class.html">SwitchClass</a> *switches, <a class="el" href="class_constant_class.html">ConstantClass</a> *constants, <a class="el" href="class_canopy_class.html">CanopyClass</a> *canopies, <a class="el" href="class_soil_class.html">SoilClass</a> *soils, <a class="el" href="class_radiation_class.html">RadiationClass</a> *radiation, <a class="el" href="class_photosynthesis_class.html">PhotosynthesisClass</a> *photosynthesis, <a class="el" href="class_respiration_class.html">RespirationClass</a> *respiration, <a class="el" href="class_stoma_conduct_class.html">StomaConductClass</a> *stomaconduct, <a class="el" href="class_micro_environment_class.html">MicroEnvironmentClass</a> *microenviron, int rank, int procsize)</td></tr>
<tr class="memdesc:a1d9227bd71f2dfba528d9fcc0a2e6fdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free all memory in host.  <a href="#a1d9227bd71f2dfba528d9fcc0a2e6fdd">More...</a><br /></td></tr>
<tr class="separator:a1d9227bd71f2dfba528d9fcc0a2e6fdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bc28844a67a2e527dc321bf4036608d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="numerical_8cc.html#a6bc28844a67a2e527dc321bf4036608d">FreeDeviceMemory</a> (<a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface, int rank, int procsize)</td></tr>
<tr class="memdesc:a6bc28844a67a2e527dc321bf4036608d"><td class="mdescLeft">&#160;</td><td class="mdescRight">To free all memory in device.  <a href="#a6bc28844a67a2e527dc321bf4036608d">More...</a><br /></td></tr>
<tr class="separator:a6bc28844a67a2e527dc321bf4036608d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29d53e43523f90ded19f2261651c8780"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="numerical_8cc.html#a29d53e43523f90ded19f2261651c8780">SetUpMLCanModel</a> (int rank, int procsize, int3 globsize, int3 domsize, int2 topolindex, <a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_switch_class.html">SwitchClass</a> *switches, <a class="el" href="class_constant_class.html">ConstantClass</a> *constants, <a class="el" href="class_canopy_class.html">CanopyClass</a> *canopies, <a class="el" href="class_soil_class.html">SoilClass</a> *soils, <a class="el" href="class_radiation_class.html">RadiationClass</a> *radiation, <a class="el" href="class_photosynthesis_class.html">PhotosynthesisClass</a> *photosynthesis, <a class="el" href="class_respiration_class.html">RespirationClass</a> *respiration, <a class="el" href="class_stoma_conduct_class.html">StomaConductClass</a> *stomaconduct, <a class="el" href="class_micro_environment_class.html">MicroEnvironmentClass</a> *microenviron, MPI_Comm *cartComm)</td></tr>
<tr class="memdesc:a29d53e43523f90ded19f2261651c8780"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up ml can model.  <a href="#a29d53e43523f90ded19f2261651c8780">More...</a><br /></td></tr>
<tr class="separator:a29d53e43523f90ded19f2261651c8780"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ed99af9eb630e71a4ad578f83e6ac0c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="numerical_8cc.html#a0ed99af9eb630e71a4ad578f83e6ac0c">MappingEigensToClasses</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *timeforcings, <a class="el" href="class_vertical_canopy_class.html">VerticalCanopyClass</a> *vertcanopies, <a class="el" href="class_eigen_canopy_class.html">EigenCanopyClass</a> *eigencanopies, <a class="el" href="class_vertical_soil_class.html">VerticalSoilClass</a> *vertsoils, <a class="el" href="class_eigen_soil_class.html">EigenSoilClass</a> *eigensoils, int nl_can, int nl_soil)</td></tr>
<tr class="memdesc:a0ed99af9eb630e71a4ad578f83e6ac0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Two-way mapping eigen classes to regular classes in host memory. This allows changes in one are automatically linked to the other. See <a href="http://eigen.tuxfamily.org/">http://eigen.tuxfamily.org/</a>.  <a href="#a0ed99af9eb630e71a4ad578f83e6ac0c">More...</a><br /></td></tr>
<tr class="separator:a0ed99af9eb630e71a4ad578f83e6ac0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3207ff87c887103ebec0329ac0a1ad66"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="numerical_8cc.html#a3207ff87c887103ebec0329ac0a1ad66">AllocateMemoryOutput</a> (<a class="el" href="class_canopy_class.html">CanopyClass</a> *canopies, <a class="el" href="class_soil_class.html">SoilClass</a> *soils, <a class="el" href="class_output_class.html">OutputClass</a> *outmlcan, int num_steps)</td></tr>
<tr class="memdesc:a3207ff87c887103ebec0329ac0a1ad66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate memory to store outputs from MLCan model. Outputs may contain variables at different sizes.  <a href="#a3207ff87c887103ebec0329ac0a1ad66">More...</a><br /></td></tr>
<tr class="separator:a3207ff87c887103ebec0329ac0a1ad66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa897f1b92b864e62d9e2d061b84d9524"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="numerical_8cc.html#aa897f1b92b864e62d9e2d061b84d9524">NumericalModelKernels</a> (int rank, int procsize, <a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="classmpi_class.html">mpiClass</a> *mpiobj)</td></tr>
<tr class="memdesc:aa897f1b92b864e62d9e2d061b84d9524"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main kernels calling numerical models including MLCan and Flow3D model. While MLCan is implemented in all MPI processes in host, Flow3D model is run in GPU device controlled by the Master process. Communications between MPI and GPU for link MLCan and Flow3D is executed in Master process only. Simulations in other MPI processes are gatherred/scatterred to mMaster process every time step for communicating with GPU device.  <a href="#aa897f1b92b864e62d9e2d061b84d9524">More...</a><br /></td></tr>
<tr class="separator:aa897f1b92b864e62d9e2d061b84d9524"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a371bc32b72323690def17ba8205f4fd3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AllocateMemoryFlowModel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *&#160;</td>
          <td class="paramname"><em>timeforcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>overland_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>overland_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>subsurface_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>subsurface_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_steps</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate run-time memory for Flow3D model in host and device memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">timeforcings</td><td>Class including time forcings </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">overland_host</td><td>Overland flow class in host memory </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">overland_dev</td><td>Overland flow class in device memory </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface_host</td><td>Subsurface flow class in host memory </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface_dev</td><td>Subsurface flow class in device memory </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">globsize</td><td>Size of the global domain </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_steps</td><td>Number of time steps for simulation </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9da8704200ecb683a74555de7c432d29"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AllocateMemoryForcing </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *&#160;</td>
          <td class="paramname"><em>timeforcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_steps</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate memory for forcing variables. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">timeforcings</td><td>Class including time forcings </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_steps</td><td>Number of time steps for simulation </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3207ff87c887103ebec0329ac0a1ad66"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AllocateMemoryOutput </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_canopy_class.html">CanopyClass</a> *&#160;</td>
          <td class="paramname"><em>canopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_soil_class.html">SoilClass</a> *&#160;</td>
          <td class="paramname"><em>soils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_output_class.html">OutputClass</a> *&#160;</td>
          <td class="paramname"><em>outmlcan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_steps</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate memory to store outputs from MLCan model. Outputs may contain variables at different sizes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">canopies</td><td>Class including variables in canopy </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">soils</td><td>Class including variables in soil </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">outmlcan</td><td>Output class from MLCan model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_steps</td><td>Number of simulation steps </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6bc28844a67a2e527dc321bf4036608d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FreeDeviceMemory </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>To free all memory in device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">overland</td><td>Overland flow class </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface</td><td>Subsurface flow class </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1d9227bd71f2dfba528d9fcc0a2e6fdd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FreeHostMemory </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *&#160;</td>
          <td class="paramname"><em>timeforcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_forcing_class.html">ForcingClass</a> *&#160;</td>
          <td class="paramname"><em>forcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_switch_class.html">SwitchClass</a> *&#160;</td>
          <td class="paramname"><em>switches</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_constant_class.html">ConstantClass</a> *&#160;</td>
          <td class="paramname"><em>constants</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_canopy_class.html">CanopyClass</a> *&#160;</td>
          <td class="paramname"><em>canopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_soil_class.html">SoilClass</a> *&#160;</td>
          <td class="paramname"><em>soils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_radiation_class.html">RadiationClass</a> *&#160;</td>
          <td class="paramname"><em>radiation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_photosynthesis_class.html">PhotosynthesisClass</a> *&#160;</td>
          <td class="paramname"><em>photosynthesis</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_respiration_class.html">RespirationClass</a> *&#160;</td>
          <td class="paramname"><em>respiration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_stoma_conduct_class.html">StomaConductClass</a> *&#160;</td>
          <td class="paramname"><em>stomaconduct</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_micro_environment_class.html">MicroEnvironmentClass</a> *&#160;</td>
          <td class="paramname"><em>microenviron</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free all memory in host. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">timeforcings</td><td>Class including time forcings </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">forcings</td><td>Class including forcings info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">overland</td><td>Overland flow class </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface</td><td>Subsurface flow class </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">switches</td><td>Class including switch info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">constants</td><td>Class including constant info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">canopies</td><td>Class including canopy variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">soils</td><td>Class including soil variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">radiation</td><td>Class including radiation variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">photosynthesis</td><td>Class including photosynthesis variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">respiration</td><td>Class including respiration variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">stomaconduct</td><td>Class including stomaconductance variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">microenviron</td><td>Class including microenrivonment variables </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0ed99af9eb630e71a4ad578f83e6ac0c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MappingEigensToClasses </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *&#160;</td>
          <td class="paramname"><em>timeforcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_vertical_canopy_class.html">VerticalCanopyClass</a> *&#160;</td>
          <td class="paramname"><em>vertcanopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_eigen_canopy_class.html">EigenCanopyClass</a> *&#160;</td>
          <td class="paramname"><em>eigencanopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_vertical_soil_class.html">VerticalSoilClass</a> *&#160;</td>
          <td class="paramname"><em>vertsoils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_eigen_soil_class.html">EigenSoilClass</a> *&#160;</td>
          <td class="paramname"><em>eigensoils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nl_can</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nl_soil</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Two-way mapping eigen classes to regular classes in host memory. This allows changes in one are automatically linked to the other. See <a href="http://eigen.tuxfamily.org/">http://eigen.tuxfamily.org/</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Class including project information </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeforcings</td><td>Forcing variables over the entire simulation period. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">vertcanopies</td><td>Canopy classes including vertical variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">eigencanopies</td><td>Canopy class defined in eigen structure </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">vertsoils</td><td>Soil classes including vertical variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">eigensoils</td><td>Soil class defined in eigen structure </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nl_can</td><td>Number of canopy layers </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nl_soil</td><td>Number of soil layers </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa897f1b92b864e62d9e2d061b84d9524"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NumericalModelKernels </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmpi_class.html">mpiClass</a> *&#160;</td>
          <td class="paramname"><em>mpiobj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main kernels calling numerical models including MLCan and Flow3D model. While MLCan is implemented in all MPI processes in host, Flow3D model is run in GPU device controlled by the Master process. Communications between MPI and GPU for link MLCan and Flow3D is executed in Master process only. Simulations in other MPI processes are gatherred/scatterred to mMaster process every time step for communicating with GPU device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">files</td><td>Number of time steps for simulation </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Filename for loading data </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">mpiobj</td><td>The message passing interface objects </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a29d53e43523f90ded19f2261651c8780"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SetUpMLCanModel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>domsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int2&#160;</td>
          <td class="paramname"><em>topolindex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_switch_class.html">SwitchClass</a> *&#160;</td>
          <td class="paramname"><em>switches</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_constant_class.html">ConstantClass</a> *&#160;</td>
          <td class="paramname"><em>constants</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_canopy_class.html">CanopyClass</a> *&#160;</td>
          <td class="paramname"><em>canopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_soil_class.html">SoilClass</a> *&#160;</td>
          <td class="paramname"><em>soils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_radiation_class.html">RadiationClass</a> *&#160;</td>
          <td class="paramname"><em>radiation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_photosynthesis_class.html">PhotosynthesisClass</a> *&#160;</td>
          <td class="paramname"><em>photosynthesis</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_respiration_class.html">RespirationClass</a> *&#160;</td>
          <td class="paramname"><em>respiration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_stoma_conduct_class.html">StomaConductClass</a> *&#160;</td>
          <td class="paramname"><em>stomaconduct</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_micro_environment_class.html">MicroEnvironmentClass</a> *&#160;</td>
          <td class="paramname"><em>microenviron</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MPI_Comm *&#160;</td>
          <td class="paramname"><em>cartComm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets up ml can model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">globsize</td><td>Size of global computational domain </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">domsize</td><td>Size of local domain in each MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">topolindex</td><td>The 2D index in the desired topology </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">files</td><td>Class including files for loading data </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Class including project info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">switches</td><td>Class including switches </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">constants</td><td>Class including constants </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">canopies</td><td>Class including canopies </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">soils</td><td>Class including soils </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">radiation</td><td>Class including radiation </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">photosynthesis</td><td>Class including photosynthesis </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">respiration</td><td>Class including respiration </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">stomaconduct</td><td>Class including stomaconduct </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">microenviron</td><td>Class including microenviron </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">cartComm</td><td>Carthesian MPI communicator </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
